package com.gitee.kamismile.disruptorEx.commandhandling.disruptor;

import com.gitee.kamismile.disruptorEx.commandhandling.CommandCallback;
import com.gitee.kamismile.disruptorEx.commandhandling.CommandMessage;
import com.gitee.kamismile.disruptorEx.commandhandling.messaging.GenericMessage;

public class CommandHandlingEntry<T> {

    private Object result;
    private CommandCallback callback;
    private GenericMessage genericMessage;


    public void reset(CommandMessage command, CommandCallback callback) {
        this.callback = callback;
        this.genericMessage=new GenericMessage(command);
    }

    public GenericMessage getGenericMessage() {
        return genericMessage;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    public Object getResult() {
        return result;
    }

    public CommandCallback getCallback() {
        return callback;
    }
}
